﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DiscreteSimulation.Util;

namespace DiscreteSimulation.Simulation
{
    public class SimulationQueue
    {
        public SimulationQueue(int capacity, int servers, double service, double averageOrPercentage)
        {
            this.clients = 0;
            this.capacity = capacity;
            this.servers = servers;
            this.service = service;
            this.averageOrPercentage = averageOrPercentage;
        }

        public int AddClient()
        {
            if (this.clients < this.Capacity)
                return this.clients++;
            else return -1;
        }

        public int RemoveClient()
        {
            if (clients > 0)
                return this.clients--;
            else return this.clients = 0;
        }

        private double averageOrPercentage;
        public double AverageOrPercentage
        {
            get
            {
                return this.averageOrPercentage;
            }
        }

        private double service;
        public double Service
        {
            get
            {
                return this.service;
            }
        }

        private int capacity;
        public int Capacity
        {
            get
            {
                return this.capacity;
            }
        }

        private int servers;
        public int Servers
        {
            get
            {
                return this.servers;
            }
        }

        private int clients;
        public int Clients
        {
            get
            {
                return this.clients;
            }
        }
    }
}
